package com.pro.common.service.user.fallback;

import com.pro.common.api.statics.user.amount.enums.EnumAmountNegativeDeal;
import com.pro.common.api.statics.user.amount.model.base.AmountEntityRecordBaseDTO;
import com.pro.common.api.statics.user.amount.model.base.AmountEntityUnitDTO;
import com.pro.common.api.user.intf.UserAmountFeignClient;
import com.pro.common.api.user.intf.UserFeignClient;
import com.pro.common.api.user.model.db.User;
import com.pro.common.api.user.model.db.UserAmountRecord;
import com.pro.common.service.user.service.UserSimpleService;
import com.pro.common.service.user.service.unit.UserAmountUnitService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collection;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/")
@AllArgsConstructor
public class UserAmountFeignFallback<T extends User> implements UserAmountFeignClient {
    @Autowired
    private UserAmountUnitService userAmountUnitService;

    @Override
    public List<UserAmountRecord> change(AmountEntityUnitDTO<AmountEntityRecordBaseDTO> dto) {
        return userAmountUnitService.change(dto);
    }

}
